//
//  SpacerBootcamp.swift
//  swiftUiTest
//
//  Created by Mac on 2023/6/26.
//

import SwiftUI

struct SpacerBootcamp_13: View {
    var body: some View {
        VStack {
            HStack(spacing:0) {
                
                Spacer()
                    .frame(height: 10)
                    .background(Color.orange)
                Rectangle()
                    .frame(width: 100,height: 100)
            
                
                Rectangle()
                    .fill(Color.green)
                    .frame(width: 100,height: 100)
                Spacer()
                    .frame(height: 10)
                    .background(Color.orange)
            }
            
            HStack(spacing:0) {
                
                Spacer()
                    .frame(height: 10)
            
                Rectangle()
                    .frame(width: 100,height: 100)
            
                
                Spacer()
                    .frame(height: 10)  
                 
                Rectangle()
                    .fill(Color.gray)
                    .frame(width: 100,height: 100)
                
                Spacer()
                    .frame(height: 10)
             
                
                Rectangle()
                    .fill(Color.green)
                    .frame(width: 100,height: 100)
                Spacer()
                    .frame(height: 10)
                    
            }
        }
      
    }
}

struct SpacerBootcamp_Previews: PreviewProvider {
    static var previews: some View {
        SpacerBootcamp_13()
    }
}
